#type vertex
#version 330 core

layout(location = 0) in vec3 aPos;
layout(location = 1) in vec3 aNor;
layout(location = 2) in vec2 aTex;

out vec3 FragPos;
out vec3 FragNor;
out vec2 FragTex;

uniform mat4 _model;
uniform mat4 _view;
uniform mat4 _project;

void main()
{
    FragPos = (_model * vec4(aPos, 1.0)).xyz;
    FragNor = aNor;
    FragTex = aTex;
    gl_Position = _project * _view * _model * vec4(aPos, 1.0);
}

#type fragment
#version 330 core

in vec3 FragPos;
in vec3 FragNor;
in vec2 FragTex;

out vec4 FragColor;

void main()
{
    FragColor = vec4(0.5) + 0.5 * vec4(FragNor.x, FragNor.y, FragNor.z, 1.0);
}

